package com.app.android.coliy.ui.activity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.WindowManager;

import androidx.annotation.Nullable;

import com.app.android.coliy.R;


/**
 * Created by Administrator on 2018/7/21.
 */

public class LoadingActivity extends Activity {

    Handler handler = new Handler();
    Context mContext;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_loading);
        mContext = this;

        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                jump();
            }
        }, 1500);

    }

    private void jump() {
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        Intent intent = new Intent(mContext, TestActivity.class);
        mContext.startActivity(intent);
        overridePendingTransition(R.anim.main_activity_in, R.anim.splash_out);
        finish();
    }
}
